package com.project.bohang.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bohang.entity.SendGoodsRecord;
import com.project.bohang.mapper.SendGoodsRecordMapper;
import com.project.bohang.pojo.dto.SendGoodsRecordDto;
import com.project.bohang.pojo.vo.HouseVo;
import com.project.bohang.pojo.vo.SendGoodsRecordVo;
import com.project.bohang.service.SendGoodsRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bohang
 * @since 2022-03-26
 */
@Service
public class SendGoodsRecordServiceImpl extends ServiceImpl<SendGoodsRecordMapper, SendGoodsRecord> implements SendGoodsRecordService {

    @Resource
    private SendGoodsRecordMapper sendGoodsRecordMapper;

    @Override
    public IPage<SendGoodsRecordVo> sendGoodsRecordList(SendGoodsRecordDto req) {
        IPage<SendGoodsRecordVo> page = new Page<>(req.getPageIndex(), req.getPageSize());
        List<SendGoodsRecordVo> list = sendGoodsRecordMapper.sendGoodsRecordList(page,req);
        page.setRecords(list);
        return page;
    }
}
